package zzr.library.db.dao;

import androidx.room.Dao;
import androidx.room.Insert;
import androidx.room.Query;
import androidx.room.Update;

import zzr.library.db.obj.ReaderDO;

@Dao
public interface ReaderDAO {

    @Insert
    void insert(ReaderDO readerDO);

    @Update
    void update(ReaderDO readerDO);

    @Query("SELECT * FROM reader WHERE rid = :rid")
    ReaderDO selectById(int rid);


    @Query("SELECT * FROM reader WHERE sid = :sid AND pwd  =:pwd")
    ReaderDO selectBySidAndPwd(int sid, String pwd);

}
